import { reactive } from 'vue'
import request from './http'

//获取评论
export const getComment = params => {
    const data = reactive({
        goods_id : params
    })
    return request({
        url: '/comment/all',
        method: 'post',
        data
    })
}

//获取商城评论
export const getMallComment = params => {

    return request({
        url: '/comment/mallall',
        method: 'get',
        params
    })
}

//插入评论
export const insertComment = params => {
    return request({
        url: '/comment/insertComment',
        method: 'post',
        data: params
    })
}

//删除评论
export const deleteComment = params => {
    return request({
        url: '/comment/deleteComment',
        method: 'post',
        data: params
    })
}